package com.fs.warehouse.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fs.warehouse.pojo.WhDetailed;
import com.fs.warehouse.pojo.WhInvInventory;
import com.fs.warehouse.pojo.WhInvInventoryDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author hys
 * @since 2024-08-06
 */
@Mapper
public interface WhInvInventoryMapper extends BaseMapper<WhInvInventory> {
    /**
     * 添加入库单
     * @param invInventory 入库单对象
     * @return 影响行数
     */
    long addInventory(WhInvInventory invInventory);

    /**
     * 查询所有入库单
     * @param page 分页格式
     * @param inventory 入库单对象
     * @return 入库单集合
     */
    List<WhInvInventory> selectInventoryList(Page<WhInvInventory> page,@Param("inventory") WhInvInventory inventory);

    /**
     * 根据id查询入库单明细
     * @param id 入库单id
     * @return 库存明细集合
     */
     List<WhDetailed> selectWarehousingDetailedById(int id);
    /**
     * 根据id查询出库单明细
     * @param id 出库单id
     * @return 库存明细集合
     */
    List<WhDetailed> selectOutboundDetailedById(int id);

    /**
     * 根据库存盘点id查询所有盘点明细
     * @param id
     * @return
     */
    List<WhInvInventoryDetail> selectWhInvInventoryDetailByInventoryId(Integer id);
}
